Add support for retrieving the configuration of the base image#27
Merged
Add support for retrieving the configuration of the base image#27
Conversation
Add a new struct (PackConfig) as a new field of Packinstructions to store useful information for the configuration of the final image. For the time being only the cmmonad line, the reference of the base image and the monitor is stored, but in the future, we will store there, environment variables, user/group and other configuration options of the final image. Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Change the way we set up the configuration of the final image in order to support the reuse of the base image's config. In that way, we can maintain the env variables, labels and other information from the base image without overwriting them. Also, improve the readability of the code and create smaller helper functions with a particular purpose. Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
82c080d to
eddb24c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change the way we configure the final image, in order to support the reuse of the configuration in the base image. In that way, we are able to keep various configuration options of the base image, such as environment variables, user, group, workdir etc. Furthermore, update the necessary options (i.e. cmd, labels, entrypoint) based on the input of the user.